home *** CD-ROM | disk | FTP | other *** search
- PREVENT ACCIDENTAL ERASURE OF YOUR HARD DISK
-
- This information has been adapted for DOS 2.1 from the December
- issue of PCPLUS, the newsletter of the Central Texas PC Users
- Group.
-
- I hope none of you has had the misfortune to have found this
- out the hard way, but the FORMAT command in DOS 2.1 (and
- previous versions of DOS) will format your fixed disk just
- as easily as it does your floppy diskettes. Because the
- default drive is normally "C:" on a fixed disk, the
- command "FORMAT" with no operands, followed by pressing
- ENTER twice, will instantly wipe out all your files on
- the fixed disk. And because you probably did not back up
- the files on your fixed disk yesterday, new and unique
- additions to the vocabulary of the English language are
- likely to be main fruits of your accident.
-
- Fear Not! The following simple patch to FORMAT.COM makes it
- impossible to format drive C: (or any higher disk drive
- letter) no matter how hard you try. Both FORMAT and FORMAT C:
- are disabled when drive "C:" or higher is the default drive or
- the designated drive on which a disk is to be formatted.
- The patch checks for a letter lower than "C" in the "Press any
- key to continue..." message and returns directly to DOS unless
- that is the case.
-
- I strongly recommend that this patched version of FORMAT be
- the ONLY one present on your fixed disk. The unpatched
- version of FORMAT.COM should be renamed to XFORMAT.COM, for
- example, and placed on a COPY of your DOS 2.1 floppy diskette.
- After all, you should be able to go from year to year without
- intentionally reformatting your hard disk.
-
- Follow these instructions to patch your FORMAT.COM (Version 2.1)
- program. (Comments are enclosed in parentheses.)
-
- C>CD\DOS (assumes that all of your DOS files
- are on a subdirectory named DOS)
- C>DEBUG FORMAT.COM
-
- -a 2b3
- xxxx:02B3 jmp 100f (Jump to patch; drive letter is in
- xxxx:02B6 register AL)
-
- -a 100f
- xxxx:100F cmp al,43 (Check for "C" or greater)
- xxxx:1011 jl 1015 (Jump to 1015 if less than "C")
- xxxx:1013 int 20 (Return to DOS)
- xxxx:1015 mov [ffa],al (Place drive letter in text message)
- xxxx:1018 jmp 2b6 (Resume program where we left off)
- xxxx:101B
-
- -w
- Writing 1B00 bytes
-
- -q
-
-
-